<?php
/*
 * @Author: an
 * @Date: 2021/12/9
 * @Description: 直播管理
 */


namespace App\Http\Controllers\WebApi;

use App\Services\Aliyun\Live\StreamsService;
use Illuminate\Http\Request;

class LiveController
{
    /**
     * 获取域名在线流列表
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     * @author an
     * @time 2021-12-09 14:29
     */
    public function streamsOnlineList(Request $request)
    {
        $domainName = $request->get('domainName');
        $page = $request->get('page');
        if (empty($domainName) || $page <= 0) {
            return errBack();
        }
        $stream = new StreamsService();
        $data = $stream->streamsOnlineList($domainName, $page);
        return okBack($data);
    }
}
